import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('book_user', { schema: 'db_book' })
export class AuthEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'id' })
  id: number;

  @Column('varchar', { name: 'username', length: 255 })
  username: string;

  @Column('varchar', { name: 'password', length: 255 })
  password: string;

  @Column('varchar', { name: 'phone', length: 255 })
  phone: string;

  @Column('text', { name: 'pic', nullable: true })
  pic: string | null;

  @Column('int', { name: 'openid', nullable: true })
  openid: number | null;
}
